package com.umeng.analytics.pro;

public class ce {
    private short[] a;
    private int b;

    public ce(int arg2) {

        this.b = -1;
        this.a = new short[arg2];
    }

    public short a() {
        short[] v0 = this.a;
        int v1 = this.b;
        this.b = v1 - 1;
        return v0[v1];
    }

    public void a(short arg3) {
        if(this.a.length == this.b + 1) {
            this.d();
        }

        short[] v0 = this.a;
        int v1 = this.b + 1;
        this.b = v1;
        v0[v1] = arg3;
    }

    public short b() {
        return this.a[this.b];
    }

    public void c() {
        this.b = -1;
    }

    private void d() {
        short[] v0 = new short[this.a.length << 1];
        System.arraycopy(this.a, 0, v0, 0, this.a.length);
        this.a = v0;
    }

    public String toString() {
        StringBuilder v1 = new StringBuilder();
        v1.append("<ShortStack vector:[");
        int v0;
        for(v0 = 0; v0 < this.a.length; ++v0) {
            if(v0 != 0) {
                v1.append(" ");
            }

            if(v0 == this.b) {
                v1.append(">>");
            }

            v1.append(this.a[v0]);
            if(v0 == this.b) {
                v1.append("<<");
            }
        }

        v1.append("]>");
        return v1.toString();
    }
}

